<style>
	.layui-upload-img {
		max-width: 300px
	}
</style>
<div class="layui-form" lay-filter="layPopup" style="padding: 20px 30px 0 0;">
	<div class="layui-form-item">
		<label class="layui-form-label">商品名称</label>
		<div class="layui-input-inline" style="width: 220px">
			<script template type="text/html">
				<input type="text" name="name" value="{{ d.params.name }}" placeholder="请输入商品名称" autocomplete="off"
					   class="layui-input" lay-verify="required">
			</script>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"><span class="required_class">*</span>图片</label>
		<div class="layui-input-block">
			<div class="layui-upload">
				<button class="layui-btn" id="commodity-upload-normal" type="button">上传图片</button>
				<div class="layui-upload-list" style="margin-left: -103px;">
					<script template type="text/html">
						<img class="layui-upload-img img-show" id="commodity-upload-normal-img" src="{{ d.params.img }}">
					</script>
				</div>
			</div>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">规格</label>
		<div class="layui-input-inline" style="width: 220px">
			<script template type="text/html">
				<input type="number" name="weight" value="{{ d.params.weight }}" placeholder="请输入克数" autocomplete="off"
					   class="layui-input" lay-verify="required">
			</script>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">类别</label>
		<div class="layui-input-inline" style="width: 220px">
			<script template type="text/html">
				<input type="text" name="category" value="{{ d.params.category }}" placeholder="请输入类别，例如：1段填写1" autocomplete="off"
					   class="layui-input" lay-verify="required">
			</script>
		</div>
	</div>
	<script template type="text/html">
		<input type="hidden" name="id" value="{{ d.params.id }}">
		<input name="img" type="hidden" value="{{ d.params.img }}">
	</script>
	<div class="layui-form-item">
		<label class="layui-form-label"></label>
		<div class="layui-input-inline">
			<input class="layui-btn" lay-filter="laySubmitEdit" lay-submit type="button" value="确认">
		</div>
	</div>
</div>
<script lay-done="layui.data.sendParams(d.params)" template type="text/html"></script>
<script src="../web/res/js/commodity/Index/other.js"></script>